import { MockMethod } from 'vite-plugin-mock';

export default [
    {
        url: '/mock/api/getAuthList',
        method: 'get',
        response: () => {
            return {
                code: 0,
                message: 'success',
                data: [
                    {
                        name: '项目列表',
                        id: 1,
                        viewRole: '',
                        children: [
                            {
                                name: '项目详情',
                                id: 4,
                                viewRole: '',
                                children: [
                                    {
                                        name: '审核',
                                        id: 5,
                                    },
                                ],
                            },
                            {
                                name: '查看',
                                id: 2,
                            },
                            {
                                name: '删除',
                                id: 3,
                            },
                        ],
                    },
                    {
                        name: '工程列表',
                        id: 6,
                        viewRole: '',
                        children: [
                            {
                                name: '工程详情',
                                id: 9,
                                viewRole: '',
                                children: [
                                    {
                                        name: '修改',
                                        id: 10,
                                    },
                                ],
                            },
                            {
                                name: '查看',
                                id: 7,
                            },
                            {
                                name: '删除',
                                id: 8,
                            },
                        ],
                    },
                    {
                        name: '用户管理',
                        id: 11,
                        viewRole: '',
                        children: [
                            {
                                name: '删除',
                                id: 14,
                                viewRole: '',
                            },
                            {
                                name: '查看',
                                id: 12,
                            },
                            {
                                name: '修改',
                                id: 13,
                            },
                        ],
                    },
                    {
                        name: '角色管理',
                        id: 15,
                        viewRole: '',
                        children: [
                            {
                                name: '角色删除',
                                id: 17,
                                viewRole: '',
                            },
                            {
                                name: '查看',
                                id: 18,
                            },
                            {
                                name: '修改',
                                id: 16,
                            },
                        ],
                    },
                ],
            };
        },
    },
] as MockMethod[];
